package com.csdj.t309springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 谭湛宇
 * @since 2021-12-31
 */
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String username;
    @TableField(select = false)
    private String password;

    private String name;

    private String email;

    private Byte status;

    private Integer topId;

    /**
     * 角色编号,1为管理员,0为用户
     */
    private Integer roleId;

    private LocalDateTime createTm;

    private LocalDateTime lastLoginTm;

    private String token;

    private String photo;

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getTopId() {
        return topId;
    }

    public void setTopId(Integer topId) {
        this.topId = topId;
    }
    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
    public LocalDateTime getCreateTm() {
        return createTm;
    }

    public void setCreateTm(LocalDateTime createTm) {
        this.createTm = createTm;
    }
    public LocalDateTime getLastLoginTm() {
        return lastLoginTm;
    }

    public void setLastLoginTm(LocalDateTime lastLoginTm) {
        this.lastLoginTm = lastLoginTm;
    }
    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Override
    public String toString() {
        return "User{" +
            "id=" + id +
            ", username=" + username +
            ", password=" + password +
            ", name=" + name +
            ", email=" + email +
            ", status=" + status +
            ", topId=" + topId +
            ", roleId=" + roleId +
            ", createTm=" + createTm +
            ", lastLoginTm=" + lastLoginTm +
            ", token=" + token +
            ", photo=" + photo +
        "}";
    }
}
